
#ifndef __ENCRYPT_WRAPPER_H
#define __ENCRYPT_WRAPPER_H

#include "keys.h"
#include "../aprtools/APRBucketBrigade.h"

// Add in support for symmetric keys too

class EncryptWrapper
{
   public:
      void InitEncryptWrapper(const char *iekeyname, EncryptionKey *enckey, const char *iskeyname, SigningKey *sgnkey, int compress);
      EncryptWrapper(const char *iekeyname, EncryptionKey *enckey);
      EncryptWrapper(const char *iekeyname, EncryptionKey *enckey, const char *iskeyname, SigningKey *sgnkey);
      EncryptWrapper(const char *iekeyname, EncryptionKey *enckey, int compress);
      EncryptWrapper(const char *iekeyname, EncryptionKey *enckey, const char *iskeyname, SigningKey *sgnkey, int compress);
      ~EncryptWrapper();
      std::vector<char> *EncryptBuffer(const char *buffer, size_t length);
      APRBucketBrigade *EncryptToBucket(APRBucketBrigade *bbrgde);
   private:
      char *ekeyname;
      char *skeyname;
      EncryptionKey *enckeycopy;
      SigningKey *sgnkeycopy;
      int docompress;
      int trusted;
      apr_pool_t *mp;
};

#endif
